/**
 * Project Name:BGI_DX
 * File Name:Dialect.java
 * Package Name:com.bgi.dx.common.pulgin
 * Date:2014-10-20下午09:42:13
 * Copyright (c) 2014, BGI_DX All Rights Reserved.
 *
 */

package com.bgi.uims.common.pulgin;

/**
 * ClassName:Dialect <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason: TODO ADD REASON. <br/>
 * Date: 2014-10-20 下午09:42:13 <br/>
 * 
 * @author fukun
 * @version
 * @since JDK 1.7
 * @see
 */
public interface Dialect {
	/**
	 * 是否分页
	 * 
	 * @return
	 * @author lim
	 */
	public boolean supportsLimit();

	/**
	 * 从什么位置开始
	 * 
	 * @param sql
	 * @param hasOffset
	 * @return
	 * @author lim
	 */
	public String getLimitString(String sql, boolean hasOffset);

	/**
	 * 实现物理分页
	 * 
	 * @param sql
	 * @param offset
	 *            开始
	 * @param limit
	 *            结束
	 * @return sql
	 * @author lim
	 */
	public String getLimitString(String sql, int offset, int limit);
}
